//
//  ModeViewController.h
//  Player
//
//  Created by howell on 16/3/18.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MujiMediaAssetLoader.h"
#import "MujiVideoPlayerView.h"
#import "MujiModeViewControllerProtocol.h"
#import "MBProgressHUD.h"

@class MujiDubProgressView;

//#import "MujiBaseViewController.h"
//#import "VideoModel.h"
//#import "MBProgressHUD.h"

@interface MujiDubModeViewController : UIViewController <MujiMediaAssetLoaderDelegate, MujiMediaAssetLoaderDataSource,MujiVideoPlayerViewDelegate, MujiModeViewControllerProtocol>

@property (nonatomic, copy) NSString *videoUrl;
@property (readonly, nonatomic, strong) MujiMediaAssetLoader * mediaAssetLoader;
@property (readwrite, nonatomic, assign, getter = isAutoPlay) BOOL autoPlay;
@property (nonatomic, strong)  MujiVideoPlayerView *videoPlayerView;
@property (nonatomic, strong)  UIView *actionView;


@property (nonatomic, strong)  UIView *timeView;
@property (nonatomic, strong)  UILabel *subTitleLabel;

@property (nonatomic, strong)  UIView *loadingView;

@property (nonatomic, strong)  UIImageView *loadingBackView;
@property (nonatomic, strong) UIActivityIndicatorView *actiity;
@property (nonatomic, strong) UILabel *actiityLabel;


@property (nonatomic, strong)  UILabel *timeLabel;
@property (nonatomic, strong)  UILabel *totalTimeLabel;
//@property (nonatomic, strong)  UIProgressView *timeProgrssView;

@property (nonatomic, strong)  MujiDubProgressView *timeProgrssView;


@property (nonatomic, strong)  UIButton *shareBtn;
@property (nonatomic, strong) UIButton *playButton;
@property (nonatomic, strong) UIButton *scriptButton;
@property (nonatomic, strong) UIButton *switchButton;
@property (nonatomic, strong)  UIButton *backBtn;
@property (nonatomic, strong) UIActivityIndicatorView *indicatorView;
@property (nonatomic, strong) id timeObserver;

@property (nonatomic,strong) NSString *userId;

@property (nonatomic,strong) NSString *dialogId;
@property (nonatomic,strong) NSString *resourceId;
@property (nonatomic,strong) NSString *imageUrl;
@property (nonatomic,strong) NSString *dialogTitle;
@property (nonatomic,strong) NSString *duration;
@property (nonatomic,strong) NSString *shareTitle;
@property (nonatomic,strong) NSString *shareContent;
@property (nonatomic,assign) BOOL isShowChinese;
@property (nonatomic,assign) BOOL isNoChinese;

@property (nonatomic, assign) BOOL   isWatchVC;


//@property (nonatomic, strong) VideoModel   *itemModel;


-(void) initPlayer;

- (void)showHUDWithMode:(NSInteger)mode
              labelText:(NSString *)labelText
               animated:(BOOL)animated;
- (void)hideAllHUDsAnimated:(BOOL)animated;

-(void)startplayFromLast;
- (void)tearDownTimeObserverOnPlayer:(AVPlayer *)player;
- (void)setUpTimeObserverOnPlayer:(AVPlayer *)player;
- (void)applicationWillResignActive:(NSNotification *)notification;

- (void)videoPlayViewTap;
- (void)playAction;

- (void)setupDealloc;



@end
